<?php 
    include 'connect.php';
    if (isset($_GET['com_id']) && is_numeric($_GET['com_id']) && $_GET['com_id'] > 0) {
        $com_id = $_GET['com_id'];
        $result = mysql_query("SELECT * FROM commenti WHERE com_id=$com_id") or die(mysql_error()); 
        $row = mysql_fetch_array($result);
        if($row) {
            $com_text = $row['com_text'];
        }
    }
?>
            <script type="text/javascript" src="./plugin/validation/jquery.js"></script>
            <script type="text/javascript" src="./plugin/validation/jquery.validate.js"></script>
            <div id="info-bar-small">Modifica commento</div>
            <div id="main">
                <form method="post" action="./includes/action_edit_comment.php?com_id=<?=$com_id;?>">
                     <div id="add-new-link">
                         <span class="link-option">Modifica commento</span><br /><br /><textarea name="com_text" class="comment-text" required><?php echo $com_text; ?></textarea><br />
                         <div class="floatright"><input type="submit" name="submit" value="Salva Modifiche" class="post-button"></div>
                     </div>
                </form> 
            </div>
